home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / clang / c_course.zip / INTASIGN.C < prev    next >
Text File  |  1989-12-30  |  640b  |  22 lines

  1. /* This program will illustrate the assignment statements */
  2.  
  3. main()
  4. {
  5. int a,b,c;    /* Integer variables for examples */
  6.  
  7.    a = 12;
  8.    b = 3;
  9.    c = a + b;          /* simple addition */
  10.    c = a - b;          /* simple subtraction */
  11.    c = a * b;          /* simple multiplication */
  12.    c = a / b;          /* simple division */
  13.    c = a % b;          /* simple modulo (remainder) */
  14.    c = 12*a + b/2 - a*b*2/(a*c + b*2);
  15.    c = c/4+13*(a + b)/3 - a*b + 2*a*a;
  16.    a = a + 1;          /* incrementing a variable */
  17.    b = b * 5;
  18.  
  19.    a = b = c = 20;     /* multiple assignment */
  20.    a = b = c = 12*13/4; 
  21. }
  22.